<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 团购商品列表 </nav>
<div class="page-container">
<div class="cl pd-5 bg-1 bk-gray mt-20"> 
	<div class="">
	    <form action="{:url('deal/index')}" method="get">
			<span class="select-box inline">
				<select name="category_id" class="select">
					<option value="0">全部分类</option>
					{volist name='categorys' id='vo'}
					<option value="{$vo.id}" {if condition='$category_id eq $vo.id'}selected="selected"{/if}>{$vo.name}</option>
					{/volist}
				</select>
			</span>
			<span class="select-box inline">
				<select name="city_id" class="select">
					<option value="0">全部城市</option>
					{volist name='citys' id='vo'}
					<option value="{$vo.id}" {if condition='$city_id eq $vo.id'}selected="selected"{/if}>{$vo.name}</option>
					{/volist}
				</select>
			</span> 创建日期范围：
			<input type="text" name="start_time" value="{$start_time}" class="input-text" id="countTimestart" onfocus="selecttime(1)" value="" style="width:130px;" >
				-
			<input type="text" name="end_time" value="{$end_time}" class="input-text" id="countTimestart" onfocus="selecttime(1)" value=""  style="width:130px;">
			<input type="text" name="name" value="{$name}" id="" placeholder=" 商品名称" style="width:250px" class="input-text">
			<button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索
			</button>
		</form>
	</div>
</div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<th>ID</th>
					<th>商品名称</th>
					<th>栏目分类</th>
					<th>城市</th>
					<th>购买件数</th>
					<th>开始时间----结束时间</th>
					<th>创建时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				{volist name='$deals->data' id='vo'}
				<tr class="text-c">
					<td>{$vo.id}</td>
					<td>{$vo.name}</td>
					<td>{$categoryArrs[$vo.category_id]}</td>
					<td>{$cityArrs[$vo.city_id]}</td>
					<td>{$vo.buy_count}</td>
					<td>{$vo.start_time}----{$vo.end_time}</td>
					<td>{$vo.create_time}</td>
					<td class="td-status">
						<a href="{:url('deal/status',['id'=>$vo.id,'status'=> 1])}" title="点击修改状态">{$vo.status|status}</a>
					</td>
					<td class="td-manage">
						<a style="text-decoration:none" class="ml-5" onClick="" href="javascript:;" title="查看"><i class="Hui-iconfont">&#xe6df;</i></a> <a style="text-decoration:none" class="ml-5" onClick="" href="javascript:;" title="下架"><i class="Hui-iconfont">&#xe6e2;</i></a>
					</td>
				</tr>
				{/volist}
			</tbody>
		</table>
		{$deals->render}
	</div>
</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script src="__STATIC__/admin/hui/lib/My97DatePicker/WdatePicker.js"></script>
